USE [TAW]
GO

/****** Object:  Table [dbo].[AbnormalWorkingTime]    Script Date: 06/14/2012 11:41:26 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AbnormalWorkingTime]') AND type in (N'U'))
DROP TABLE [dbo].[AbnormalWorkingTime]
GO

USE [TAW]
GO

/****** Object:  Table [dbo].[AbnormalWorkingTime]    Script Date: 06/14/2012 11:41:26 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[AbnormalWorkingTime](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[StaffNo] [varchar](5) NOT NULL,
	[TimeType] [varchar](10) NOT NULL,
	[ReasonCode] [int] NOT NULL,
	[Date] [date] NOT NULL,
	[FromTime] [time](0) NOT NULL,
	[ToTime] [time](0) NOT NULL,
	[TotalTime] [int] NOT NULL,
	[InsertBy] [nvarchar](50) NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[UpdatedBy] [nvarchar](50) NOT NULL,
	[UpdatedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_AbnormalWorkingTime] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Absent,OverTime,Assistant' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AbnormalWorkingTime', @level2type=N'COLUMN',@level2name=N'TimeType'
GO

